#include "Complex.h"
Complex::Complex() {
(*this).real=1.0;
(*this).imag=1.0;
}
Complex::Complex (double real, double imag){
(*this).real=real;
(*this).imag=imag;
}
Complex Complex::operator+(Complex z){
double real;
double imag;

real=(*this).real+z.getReal();
imag=(*this).imag+z.getImag();

Complex s=Complex(real,imag);
return s;
}

Complex Complex::operator+(double d){
double real;
double imag;

real=(*this).real+d;
imag=(*this).imag+d;

Complex s=Complex(real,imag);
return s;
}

bool Complex::operator==(Complex c)
{
    if (((*this).real==c.getReal())&&(*this).imag==c.getImag()) return true;
    else return false;
}
double Complex::getReal() {
double real;
real=(*this).real;
return real;
}
double Complex::getImag() {
double imag;
imag=(*this).imag;
return imag;
}
void Complex::setReal(double real) {
(*this).real=real;
}
void Complex::setImag(double imag) {
(*this).imag=imag;
}

